#!/bin/bash
rm -rf dist
rm -rf dist.tar
npm run build
tar -cvf dist.tar dist/*
scp -P 22058 dist.tar root@121.36.203.32:/usr/share/nginx/html/kb/huanyu
ssh -p 22058 -Tq root@121.36.203.32 << remotessh
cd /usr/share/nginx/html/kb/huanyu
rm -rf dist
rm -rf index.html
rm -rf static
tar -xvf dist.tar
cd dist
mv * ../
cd ..
rm -rf dist.tar
rm -rf dist
exit
remotessh
